package org.jeecg.modules.veterans.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.system.entity.SysUserCountSta;
import org.jeecg.modules.system.vo.SysNameValueVo;
import org.jeecg.modules.veterans.entity.SysService;
import org.jeecg.modules.veterans.entity.SysServiceApp;

import java.util.List;

/**
 * @Description: 优待服务信息表
 * @Author: jeecg-boot
 * @Date:   2022-04-06
 * @Version: V1.0
 */
public interface SysServiceAppMapper extends BaseMapper<SysServiceApp> {

    /**
     * 根据距离查找附近服务(Discount)
     * @param lng
     * @param lat
     * @param distance
     * @return
     */
    public List<SysServiceApp> queryDiscountListByCircle(@Param("lng")double lng,@Param("lat")double lat,@Param("distance")String distance,@Param("areas")String[] areas,@Param("type")String type,@Param("sort")String sort,@Param("searchCon")String searchCon,@Param("page")Long page,@Param("size")Long size);

    /**
     * 根据距离查找附近服务(Service)
     * @param lng
     * @param lat
     * @param distance
     * @return
     */
    public List<SysServiceApp> queryServiceListByCircle(@Param("lng")double lng,@Param("lat")double lat,@Param("distance")String distance,@Param("areas")String[] areas,@Param("sort")String sort,@Param("serviceType")String serviceType,@Param("page")Long page,@Param("size")Long size);

    public Integer queryServiceMountByArea(@Param("area")int area);

    public Integer queryServiceMountByAreaAndServiceType(@Param("area")int area,@Param("serviceType")String serviceType);


}
